package com.google.code.netbuilder.dal.services;

import com.google.code.netbuilder.dal.providers.*;
import com.google.code.netbuilder.dal.providersimpl.*;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class JPAServise extends DAOServis {
	
	public static EntityManager getEntityManager() {
                EntityManagerFactory emf = Persistence.createEntityManagerFactory("netbuilderPU");
                return emf.createEntityManager();
        }
	

	@Override
	public ICableProvider getCabelProvider() {
		return new CabelProviderJPA();
	}

	@Override
	public ICableWireProvider getCableWireProvider() {
		return new CabelWireProviderJPA();
	}

	@Override
	public IEquipmentPortProvider getEquipmentPortProvider(){
		return new EquipmentPortProviderJPA();
	}

	@Override
	public IEquipmentProvider getEquipmentProvider() {
		return new EquipmentProviderJPA();
	}

	@Override
	public IEquipmentVersion getEquipmentVersion() {
		return new EquipmentVersionJPA();
	}

	@Override
	public IPortProvider getPortProvider() {
		return new PortProviderJPA();
	}

	@Override
	public IWireProvider getWireProvider() {
		return new WireProviderJPA();
	}

	@Override
	public IWireVersion getWireVersion() {
		// TODO Auto-generated method stub
		return new WireVersionJPA();
	}

}
